

using System;
using System.Text;

using NHibernate;
using NHibernate.Cfg;
using NHibernate.Criterion;
using NHibernate.Exceptions;

using SpotifyGenNHibernate.EN.Spotify;
using SpotifyGenNHibernate.CAD.Spotify;

namespace SpotifyGenNHibernate.CEN.Spotify
{
        public partial class AdministradorCEN
        {
        private IAdministradorCAD _IAdministradorCAD;

        public AdministradorCEN(IAdministradorCAD _IAdministradorCAD)
        {
                this._IAdministradorCAD = _IAdministradorCAD;
        }

        public int New_ (String p_usuario, String p_password)
        {
                AdministradorEN administradorEN = null;
                int oid;

                //Initialized AdministradorEN
                administradorEN = new AdministradorEN ();
                administradorEN.Usuario = p_usuario;
                administradorEN.Password = p_password;
                //Call to AdministradorCAD

                oid = _IAdministradorCAD.New_ (administradorEN);
                return oid;
        }

        public void Destroy (int id)
        {
                _IAdministradorCAD.Destroy (
                        id

                        );
        }

        public void Editar (int p_Administrador_OID, String p_usuario, String p_password)
        {
                AdministradorEN administradorEN = null;

                //Initialized AdministradorEN
                administradorEN = new AdministradorEN ();
                administradorEN.Id = p_Administrador_OID;
                administradorEN.Usuario = p_usuario;
                administradorEN.Password = p_password;
                //Call to AdministradorCAD

                _IAdministradorCAD.Editar (administradorEN);
        }
        }
}
